#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <string>
#include "peer.h"
#include "cmd_parser.h"
#include "server.h"


int main(int argc, char **argv) {
  InputParser input(argc, argv);
  const std::string &remote_list_file = input.getCmdOption("-f");

  auto server = new Server();

  auto peer = new Peer();
  std::string line;
  std::ifstream in(remote_list_file);
  while(getline(in, line)) {
    peer->remote_list.push_back(line);
  }
  peer->runSche();
  return 0;
}